package com.xdw.permissionslib.sample;

import com.xdw.permissionslib.mylibrary.StrongPermissionsUtils;
import com.xdw.permissionslib.sample.slice.MainAbilitySlice;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;

public class MainAbility extends Ability {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setMainRoute(MainAbilitySlice.class.getName());
    }

    @Override
    public void onRequestPermissionsFromUserResult(int requestCode, String[] permissions, int[] grantResults) {
        super.onRequestPermissionsFromUserResult(requestCode, permissions, grantResults);
        //鉴权之后的回调，必须调用
        StrongPermissionsUtils.getInstance(this).onRequestPermissionsResult(requestCode, permissions, grantResults);
    }
}
